<template>
  <div class='content'>
    <img src="../assets/success.png" alt="">
    <van-button block @click='$router.push("/busword")'>去乘车</van-button>
  </div>
</template>

<script>
import { AESDecrypt } from "../utils/crypto";
import { register } from "../api";
  export default {
    
    mounted () {
      console.log(this.$route.query);
      let {code,merId} = this.$route.query
      let code1 = AESDecrypt(code)
      console.log(code1);
      if(code1=="0000"){
        this.postregister()
      }
    },
    methods: {
      go(){
        history.go(-1)
      },
      postregister() {
        let idType = "01";
        let userType = "00";
        let data = localStorage.getItem("data");
        register(data, idType, userType).then(res => {
          console.log(res);
          // this.$router.push("/success");
        });
      }
    }
  }
</script>

<style lang="scss" scoped>
.content{
  height: 100vh;
  flex-flow: column;
  align-items: center;
  box-sizing: border-box;
  img{
    margin:77.5px 95.5px 29.5px 89px;
    width: 190.5px;
    height: 206.5px;
  }
  button{
    width: 343px;
    background: linear-gradient(137deg, #318BFF 0%, #1876FF 100%);
    border-radius: 5px;
    font-size: 16px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #fff;
    margin: 0 16px;
  }
}
</style>